﻿CREATE TABLE [dbo].[SERVICIO](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[IdHabitacion] [int] NOT NULL,
	[Descripcion] [nvarchar](250) NOT NULL,
 CONSTRAINT [PK_dbo.SERVICIO] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  ForeignKey [FK_dbo.SERVICIO_dbo.HABITACION_IdHabitacion]    Script Date: 11/17/2014 00:41:42 ******/
ALTER TABLE [dbo].[SERVICIO]  WITH CHECK ADD  CONSTRAINT [FK_dbo.SERVICIO_dbo.HABITACION_IdHabitacion] FOREIGN KEY([IdHabitacion])
REFERENCES [dbo].[HABITACION] ([ID])
GO

ALTER TABLE [dbo].[SERVICIO] CHECK CONSTRAINT [FK_dbo.SERVICIO_dbo.HABITACION_IdHabitacion]
GO
CREATE NONCLUSTERED INDEX [IX_IdHabitacion] ON [dbo].[SERVICIO] 
(
	[IdHabitacion] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]